package dtos

import "github.com/edgexfoundry/edgex-go/internal/app/models"

type ProductTransport struct {
	Id          string `json:"id"`
	ProductId   string `json:"productId"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Topic       string `json:"topic"`
	Description string `json:"description"`
}

func ToProductTransportModel(dto ProductTransport) models.ProductTransport {
	var pt models.ProductTransport
	pt.Id = dto.Id
	pt.ProductId = dto.ProductId
	pt.Name = dto.Name
	pt.Type = dto.Type
	pt.Topic = dto.Topic
	pt.Description = dto.Description
	return pt
}

func FromProductTransportModelToDto(pt models.ProductTransport) ProductTransport {
	var dto ProductTransport
	dto.Id = pt.Id
	dto.ProductId = pt.ProductId
	dto.Name = pt.Name
	dto.Type = pt.Type
	dto.Topic = pt.Topic
	dto.Description = pt.Description
	return dto
}
